#!/bin/bash

# 定义备份目录和文件名
backup_dir="/data/backup/db/lzh"
backup_file="backup_$(date +%Y%m%d%H%M%S).sql"

# MySQL 登录凭据
mysql_user="cecsx"
mysql_password="uD7_hI2^"

# 执行备份命令
mysqldump -u $mysql_user -p$mysql_password --all-databases > $backup_dir/$backup_file